<template>
	<view class="mainBox">

		<view v-for="(item,index) in getGoods" :key="index">
			<view class="titleText">
				<div class="left-icon">

				</div>
				<div>
					文字评价
				</div>
			</view>
			<view class="context">
				{{item.context}}
			</view>
			<view class="titleText">
				<div class="left-icon">

				</div>
				<div>
					星级评价
				</div>
			</view>
			<view class="context">
				<div style="margin-bottom: 20rpx; display: flex;">
					医生专业度：<uv-rate v-model="item.majorstar"></uv-rate>
				</div>
				<div style="margin-bottom: 20rpx; display: flex;">
					服务满意度：<uv-rate v-model="item.servestar"></uv-rate>
				</div>
			</view>
			<view class="titleText">
				<div class="left-icon">

				</div>
				<div>
					收到礼物
				</div>
			</view>
			<view class="context">
				<uv-image src="https://cdn.uviewui.com/uview/album/1.jpg" width="80px" height="80px"></uv-image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				getGoods: [],
				count: 4,
				value: 2
			}
		},
		onLoad(option) {
			console.log("asds", option);
			this.getList(option)
		},
		methods: {
			getList(option) {
				uni.request({
					url: 'http://172.27.6.151:32112/api/get/DoctorComment',
					method: 'GET',
					data: {
						id: option.id
					},
					success: (res) => {
						console.log('333', res.data.data);
						this.getGoods = res.data.data
					}
				})
			},
			// 返回上一页
			back() {
				uni.reLaunch({
					url: '/pages/HistoricalConsultation/HistoricalConsultation'
				})
			},


		}
	}
</script>

<style>
	.mainBox {
		width: 741rpx;
		height: 100vh;
		padding: 40rpx;
	}

	.titleText {
		width: 680rpx;
		display: flex;
		align-items: center;
		font-size: 30rpx;
		font-weight: 600;
		margin-top: 40rpx;

	}

	.left-icon {
		width: 10rpx;
		height: 50rpx;
		background-color: #3087ea;
		margin-right: 20rpx;
	}

	.context {
		margin-top: 25rpx;
		font-weight: 500;
	}
</style>